package nodes.declarations;

import nodes.FieldNode;
import nodes.Type;
import visitors.Visitor;

public final class DataDeclarationNode extends DeclarationNode
{
    public String name;
    public Type type;
    public FieldNode fields;

    public DataDeclarationNode(Type type, FieldNode fields)
    {
        this.name = type.getType();
        this.type = type;
        this.fields = fields;
    }

    @Override
    public Object accept(Visitor v)
    {
        return v.visit(this);
    }
}